package addon.w3.mdx.com;

import java.io.IOException;

import addon.w3.mdx.MDXCOM;
import addon.w3.mdx.LEDataInputStream;
import addon.w3.mdx.MDXException;

/**
	struct {
		OBJ
		long 	GeosetID;
		long 	GeosetAnimID;
	} bones[nbons];
 * @author madjk
 *
 */
public class MDXBoneCOM extends MDXCOM {
	public MDXObject obj;
	public int geosetID;
	public int geosetAnimID;
	
	public String getTag() {
		return "BONE:bone";
	}
	
	public void _decode(LEDataInputStream ins) throws IOException, MDXException {
		obj = new MDXObject();
		obj.decode(ins);
		geosetID = ins.readInt();
		geosetAnimID = ins.readInt();
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("TAG : "+getTag());
		sb.append("\n\tOBJ : "+(obj == null ? false : obj.toString()));
		sb.append("\n\tGEOSETID : "+geosetID);
		sb.append("\n\tGEOSETANIMID : "+geosetAnimID);
		return sb.toString();
	}

	@Override
	public boolean isImplicitTag() {
		// TODO Auto-generated method stub
		return false;
	}
}
